package com.my.config;

import com.my.bean.Hello;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 *  基于Java注解注入对象
 *  <p>
 *      <a href="https://docs.spring.io/spring-framework/reference/core/beans/java.html">Java-based Container Configuration</a>
 *  </p>
 *
 * @author: marshal
 * @date: 2023-05-15 15:53
 */

@Configuration
public class HelloConfig {

    @Bean
    public Hello hello() {
        Hello hello = new Hello();
        hello.setMessage("create by java configuration");
        return hello;
    }
}
